<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="MasterPage.master"
    CodeFile="Reconciliation_Case.aspx.cs" Inherits="Reconciliation.Reconciliation_Case" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Src="~/Users Control/HeadMenu.ascx" TagName="HeadMenu" TagPrefix="uc1" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder2" runat="server" ID="ContentMenu">
    <uc1:HeadMenu runat="server" ID="HeadMenu" />
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server" ID="content1">
    <telerik:RadStyleSheetManager runat="server">
    </telerik:RadStyleSheetManager>
    <asp:ScriptManager ID="ScriptManager" runat="server" />
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="1100px" BorderSize="0">
        <telerik:RadPane ID="RadPane_OrderList" Scrolling="None" runat="server">
            <table>
                <tr>
                    <td style="color: Black;">
                        <h3 style="color: Black;">
                            Orders</h3>
                        <telerik:RadDatePicker AutoPostBack="true" ID="RadDatePicker1" MinDate="01/01/1900"
                            MaxDate="12/31/2100" runat="server">
                        </telerik:RadDatePicker>
                    </td>
                    <td>
                        <br />
                        <asp:DropDownList ID="ddlCPC" AutoPostBack="true" runat="server" AppendDataBoundItems="true"
                            DataSourceID="LinqDataSourceOrderAll" DataTextField="CPC" DataValueField="CPC">
                            <asp:ListItem Value="-1">Select</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        <br />
                        <asp:DropDownList ID="ddlBank" runat="server" AppendDataBoundItems="true" AutoPostBack="true"
                            DataSourceID="LinqDataSourceOrderAll" DataTextField="Bank" DataValueField="Bank">
                            <asp:ListItem Value="-1">Select</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        <h3 style="color: Black;">
                            Amount</h3>
                        <asp:DropDownList ID="ddlAmount" runat="server">
                            <asp:ListItem Value=">"> </asp:ListItem>
                            <asp:ListItem Value="<"> </asp:ListItem>
                            <asp:ListItem Value="="> </asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        <br />
                        <asp:TextBox ID="txtAmmount" runat="server"> </asp:TextBox>
                    </td>
                </tr>
            </table>
            <asp:LinqDataSource ID="LinqDataSourceOrderAll" runat="server" ContextTypeName="WebApplication1.DataClassesOrderDataContext"
                TableName="Orders">
            </asp:LinqDataSource>
            <telerik:RadGrid runat="server" ID="RadGridOrderList" Height="400px" PagerStyle-AlwaysVisible="true"
                AutoGenerateColumns="False" GridLines="None" AllowSorting="True" AllowCustomPaging="true"
                DataSourceID="LinqDataSourceOrder" EnableLinqExpressions="False" AllowPaging="True">
                <PagerStyle AlwaysVisible="True" />
                <MasterTableView DataSourceID="LinqDataSourceOrder">
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridHyperLinkColumn ItemStyle-Font-Underline="true" DataNavigateUrlFormatString="OrderDetails.aspx?OrderID={0}"
                            Target="ctl00_ContentPlaceHolder1_RadPane_CaseView" DataNavigateUrlFields="OrderID"
                            HeaderText="OrderdID" UniqueName="OrderID" DataTextField="OrderID" DataType="System.Int32"
                            AllowFiltering="false">
                            <ItemStyle Font-Underline="True" />
                        </telerik:GridHyperLinkColumn>
                        <%--  <telerik:GridBoundColumn HeaderText="OrderID" UniqueName="OrderID" 
                                                                    DataField="OrderID" DataType="System.Int32"  >
                                                                </telerik:GridBoundColumn>--%>
                        <telerik:GridBoundColumn DataField="Date" DataType="System.DateTime" HeaderText="Date"
                            SortExpression="Date" UniqueName="Date" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                            ShowFilterIcon="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Bank" AutoPostBackOnFilter="true" ShowFilterIcon="true"
                            CurrentFilterFunction="Contains" HeaderText="Bank" SortExpression="Bank" UniqueName="Bank">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CPC" AutoPostBackOnFilter="true" ShowFilterIcon="false"
                            CurrentFilterFunction="Contains" HeaderText="CPC" SortExpression="CPC" UniqueName="CPC">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Expected" HeaderText="Expected" AllowFiltering="false"
                            SortExpression="Expected" UniqueName="Expected">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Physical" HeaderText="Physical" AllowFiltering="false"
                            SortExpression="Physical" UniqueName="Physical">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Difference" HeaderText="Difference" AllowFiltering="false"
                            SortExpression="Difference" UniqueName="Difference">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Comment" HeaderText="Comment" AllowFiltering="false"
                            SortExpression="Comment" UniqueName="Comment">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CaseStatus" DataType="System.DateTime" AllowFiltering="false"
                            HeaderText="CaseStatus" SortExpression="CaseStatus" UniqueName="CaseStatus">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="InvoiceStatus" HeaderText="InvoiceStatus" AllowFiltering="false"
                            SortExpression="InvoiceStatus" UniqueName="InvoiceStatus">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn HeaderText="Details">
                            <ItemTemplate>
                                <a href="OrderDetails.aspx?OrderID=" target="<%=RadPane_CaseView.ClientID %>">View</a>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    <Selecting AllowRowSelect="True" />
                </ClientSettings>
            </telerik:RadGrid>
            <b></b>
            <asp:LinqDataSource ID="LinqDataSourceOrder" runat="server" ContextTypeName="WebApplication1.DataClassesOrderDataContext"
                TableName="Orders" Where="Bank=@Bank  && CPC=@CPC && Date=Convert.ToDateTime(@Date)">
                <SelectParameters>
                </SelectParameters>
                <WhereParameters>
                    <asp:ControlParameter ControlID="ddlBank" Name="Bank" Type="String" DefaultValue="Select" />
                    <asp:ControlParameter ControlID="ddlCPC" Name="CPC" Type="String" DefaultValue="Select" />
                    <asp:ControlParameter ControlID="RadDatePicker1" Name="Date" Type="DateTime" DefaultValue="" />
                </WhereParameters>
            </asp:LinqDataSource>
        </telerik:RadPane>
        <telerik:RadSplitBar CollapseMode="Forward" runat="server" />
        <telerik:RadPane ID="RadPane_CaseView" runat="server" ContentUrl="about:blank" EnableEmbeddedBaseStylesheet="False"
            EnableEmbeddedSkins="False" Index="2" Skin="">
            <div style="background-color: Gray">
            </div>
            <table>
                <tr>
                    <td>
                    </td>
                </tr>
            </table>
        </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>
